﻿/*
 * GDOGridFrame
 * 
 * initial implementation : 20.9.2008
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
using System.Collections.Generic;
using Petra.Gis.Geometry.Support;
using Petra.Gis.Geometry.GridSupport;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace Petra.Gis.DataServices
{
  public class GridFrame : GridFrameBase
  {

    //BitmapSource _frame;
    //List<StandardImageBlock> _blocks = new List<StandardImageBlock>();
    //List<GridBlock> _blocks = new List<GridBlock>();


    public GridFrame(BitmapSource frame, BoundingBox bounds)
    {
      //_bounds = bounds;
      Bounds = bounds;
      Data = frame;
      //_frame = frame;
      //_blocks.Add(new StandardImageBlock(frame, bounds));

    }



    public override int Height
    {
      //get { return _frame.PixelHeight; }
      get { return Data.PixelHeight; }
    }




    public override int Width
    {
      //get { return _frame.PixelWidth; }
      get { return Data.PixelWidth; }
    }




    public override PixelFormat PixelFormat
    {
      //get { return _frame.Format;}
      get { return Data.Format; }
    }



    //public override int BlockHeight
    //{
    //  get { return _frame.PixelHeight; }
    //}




    //public override int BlockWidth
    //{
    //  get { return _frame.PixelWidth; }
    //}




    //public override GridBlock[] Blocks
    //{
    //  get { return _blocks.ToArray(); }
    //}



    //public override GridFrame SelectBlocksByRange(BoundingBox range)
    //{
    //  return this;
    //}





    //public override int NumBlocksHorizontal
    //{
    //  get { return 1; }
    //}




    //public override int NumBlocksVertical
    //{
    //  get { return 1; }
    //}



    //System.Windows.Media.Imaging.BitmapPalette
    public override object Palette
    {
      //get { return _frame.Palette; }
      get { return Data.Palette; }
    }






    //public override object Data
    //{
    //  get { return (BitmapFrame)_frame; }
    //}






    //public override GridCells SelectCellsByRange(BoundingBox range)
    //{
    //  throw new NotImplementedException();
    //}
  }
}
